package main

type Student struct {
	id int
	name string
	sex byte
}

func main() {
	var s Student
	var p *Student
	p = &s

	// 结构体类型指针操作内部变量时 p. 等同于 (*p)
	s.id = 1
	p.name = "Mr"
	(*p).sex = 'M'
}
